<template>
  <div class="package-detail">
    <el-form ref="form" :model="form" label-width="100px">
      <el-form-item label="课程包封面">
        <img :src="form.waitUrl" alt>
      </el-form-item>
      <el-form-item label="课程包简介">
        <el-input
          v-model="form.someDetail"
          :disabled="true"
          :rows="6"
          type="textarea"
          placeholder="输入课程描述"
          style="width:500px;"
        />
        <p style="margin:0;color:#8a8a8a">注:课程包简介最多输入120个字</p>
      </el-form-item>
      <el-form-item label="课程包详情">
        <div style="width:580px;">
          <tinymce :toolbar="form.toolbar" :height="250" :disabled="true" :show="true"/>
        </div>
      </el-form-item>
      <el-form-item>
        <el-button @click="backStep">上一步</el-button>
        <el-button type="primary" @click="nextStep">返回列表</el-button>
        <el-button @click="handleCancel">取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import Tinymce from '@/components/Tinymce'
import toolbar from '@/components/Tinymce/toolbar.js'
export default {
  components: {
    Tinymce
  },
  data() {
    return {
      form: {
        packageName: '',
        someDetail: '',
        toolbar,
        waitUrl: '/src/icons/noimg@2x.png'
      },
      dialog: false
    }
  },
  methods: {
    nextStep() {
      this.$router.push('/classpackage/classpackage-buy')
    },
    backStep() {
      this.$emit('back')
    },
    handleCancel() {
      this.$router.go(-1)
    }
  }
}
</script>

<style lang="scss" scoped>
.package-detail {
  .el-form {
    margin-top: 30px;
  }
}
</style>
